package me.luraframework.gateway.module.route;

import lombok.Data;
import me.luraframework.gateway.auth.handler.AuthType;
import org.hibernate.validator.constraints.URL;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import javax.validation.constraints.NotNull;

/**
 * @ description: ApiGw
 * @ author: Liu Ran
 * @ data: 7/14/23 09:50
 */
@Data
@Table("gateway_api")
public class GwApi {

    public static final String ROUTE_METADATA_AUTH_TYPE = "authType";
    public static final String ROUTE_METADATA_SWAGGER_URL = "swaggerUrl";
    @Id
    private String name;

    @NotNull
    private String path;

    @URL
    private String uri;
    @NotNull
    private AuthType authType;

    private String swaggerUrl;


}
